package service.impl;

import org.junit.Test;
import pojo.House;
import service.HouseService;


/**
 * @author :kuexun
 * @description : todo
 * @create : 2019/9/2 22:21
 */
public class HouseServiceImplTest{

    HouseService service = new HouseServiceImpl();
    @Test
    public void findHouses() {
        service.findHouses().forEach(System.out::println);
    }

    @Test
    public void addHouse() {
        House house = new House();
        house.setTitle("nisdjjgksj");
        service.addHouse(house);
        findHouses();
    }

    @Test
    public void updateHouse() {
        House house = new House();
        house.setId(11);
        house.setFloorAge(33);
        house.setPrice(0.33);
        house.setTitle("nisdjjgksj");
        house.setDescription("nisdjjgksj");
        service.updateHouse(house);
        findHouses();
    }

    @Test
    public void delHouse() {
        service.delHouse(12);
        findHouses();
    }
}